Pen Tables for Vector Devices
If a device driver for a vector device sets up a pen table, your application can access it to determine the colors and sizes of the pens in the device's carousel. The driver sets up a pen table in a tag object and creates a reference to the tag object in the view device object associated with the vector device. For more information about how a driver sets up a pen table, see the printing messages chapter of Inside Macintosh: QuickDraw GX Printing Extensions and Drivers.Your application can reference this pen table by retrieving the contents of the gxPenTableTag tag, which is defined as 'pent', from the view device object associated with the vector device. For example, if the user creates a line with a thickness that is smaller than a pen's thickness, your application could detect this situation and warn the user that the screen display will not match the printed output.
The gxPenTableEntry structure defines the data available for each pen in the carousel:
struct gxPenTableEntry { Str31 penName; gxColor penColor; fixed penThickness; short penUnits; short penPosition; };The contents of the gxPenTableTag tag object contain one or more of these pen table entries. The contents of the gxPenTableTag tag object are defined by a gxPenTable structure:
struct gxPenTable{ short numPens; gxPenTableEntry pens[1]; };Several constants are available for comparison with the contents of the penUnits field:
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help